﻿using GloboTicketAdmin.Mobile.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GloboTicketAdmin.Mobile.Services
{
    public class NavigationService : INavigationService
    {
        public Task GoToAddEvent()
        {
            return Shell.Current.GoToAsync("event/add");
        }

        public Task GoToEditEvent(EventModel detailEvent)
        {
            var parameters = new Dictionary<string, object>
            {
                { "Event", detailEvent }
            };
            return Shell.Current.GoToAsync("event/edit", parameters);
        }

        public Task GoToEventDetail(Guid id)
        {
            var parameters = new Dictionary<string, object>
            {
                { "EventId", id }
            };
            return Shell.Current.GoToAsync("event",parameters);
        }

        public Task GoToOverview()
        {
            return Shell.Current.GoToAsync("overview");
        }
        public Task GoBack()
        {
            return Shell.Current.GoToAsync("..");
        }
    }
}
